ga.core.evaluation
Class AbstractInteractiveEvaluator<T extends IIndividual<T>>
java.lang.Object
ga.core.evaluation.AbstractInteractiveEvaluator<T>
- Type Parameters:
T - The generic type of the individuals.
- All Implemented Interfaces:
- IFitnessEvaluator<T>, IInteractiveFitnessEvaluator<T>
public abstract class AbstractInteractiveEvaluator<T extends IIndividual<T>>
- extends java.lang.Object
- implements IInteractiveFitnessEvaluator<T>
Abstract class for interactive fitness evaluators. This adds listener
handling to the IInteractiveFitnessEvaluator interface.
- Since:
- 11.08.2012
- Author:
- Stephan Dreyer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
listeners
private final java.util.List<EvaluationListener<T extends IIndividual<T>>> listeners
AbstractInteractiveEvaluator
public AbstractInteractiveEvaluator()
fireNewIndividualRequested
public void fireNewIndividualRequested()
- Description copied from interface:
IInteractiveFitnessEvaluator
- Notification method that causes all
EvaluationListeners being
notified that the evaluator demands a new individual for evaluation.
- Specified by:
fireNewIndividualRequested in interface IInteractiveFitnessEvaluator<T extends IIndividual<T>>
fireIndividualEvaluated
public void fireIndividualEvaluated(T individual)
- Description copied from interface:
IInteractiveFitnessEvaluator
- Notification method that causes all
EvaluationListeners being
notified that the evaluator has evaluated the individual.
- Specified by:
fireIndividualEvaluated in interface IInteractiveFitnessEvaluator<T extends IIndividual<T>>
- Parameters:
individual - The evaluated individual.
addEvaluationListener
public void addEvaluationListener(EvaluationListener<T> listener)
- Description copied from interface:
IInteractiveFitnessEvaluator
- Adds an
EvaluationListener that will be notified about the
evaluation state.
- Specified by:
addEvaluationListener in interface IInteractiveFitnessEvaluator<T extends IIndividual<T>>
- Parameters:
listener - The listener.
removeEvaluationListener
public void removeEvaluationListener(EvaluationListener<T> listener)
- Description copied from interface:
IInteractiveFitnessEvaluator
- Adds an
EvaluationListener.
- Specified by:
removeEvaluationListener in interface IInteractiveFitnessEvaluator<T extends IIndividual<T>>
- Parameters:
listener - The listener.